package com.blqy.fr.model.user;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.blqy.fr.model.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * 用户签到记录实体类
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "UserClock")
@TableName("user_clock")
public class UserClock extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @Schema(description = "用户ID")
    @TableField("user_id")
    private Long userId;

    @Schema(description = "是否计入连续签到：0-否 1-是（默认1）")
    @TableField("is_continuous")
    private Integer isContinuous;

    @Schema(description = "签到日期（如 '2024-06-15'）")
    @TableField("checkin_date")
    private Date checkinDate;

    @Schema(description = "签到时间（精确到秒）")
    @TableField("created_at")
    private Date createdAt;

    @Schema(description = "签到当天的连续天数（用于快速展示，避免实时计算）")
    @TableField("streak_days")
    private Integer streakDays;
}